<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>错误 - 养老院管理系统</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
    <link rel="stylesheet" th:href="@{/css/main.css}">
</head>
<body>
<div class="container">
    <div class="row justify-content-center mt-5">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header bg-danger text-white">
                    <h4 class="mb-0"><i class="fas fa-exclamation-triangle mr-2"></i>发生错误</h4>
                </div>
                <div class="card-body text-center">
                    <div class="mb-4">
                        <i class="fas fa-times-circle text-danger" style="font-size: 5rem;"></i>
                    </div>
                    <h5 th:text="${status} ?: '错误'">错误</h5>
                    <p class="mb-0" th:text="${message} ?: '发生了一个错误，请稍后再试。'">发生了一个错误，请稍后再试。</p>
                    <p class="text-muted mt-3" th:if="${timestamp}">
                        <small th:text="${#dates.format(timestamp, 'yyyy-MM-dd HH:mm:ss')}">时间戳</small>
                    </p>
                </div>
                <div class="card-footer">
                    <div class="row">
                        <div class="col-6">
                            <a th:href="@{/}" class="btn btn-outline-primary btn-block">
                                <i class="fas fa-home mr-1"></i> 返回首页
                            </a>
                        </div>
                        <div class="col-6">
                            <button onclick="window.history.back()" class="btn btn-outline-secondary btn-block">
                                <i class="fas fa-arrow-left mr-1"></i> 返回上一页
                            </button>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>
<script th:src="@{/js/main.js}"></script>
</body>
</html>